# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-oscpy
pkgver=0.6.0
pkgrel=3
pkgdesc="A modern and efficient OSC Client/Server implementation"
url="https://github.com/kivy/oscpy"
license=('MIT')
arch=('any')
depends=('python')
makedepends=('python-setuptools')
checkdepends=('python-pytest' 'python-pytest-rerunfailures')
source=("https://github.com/kivy/oscpy/archive/v$pkgver/$pkgname-$pkgver.tar.gz")
sha512sums=('55f9a4f8aaa15af3944392c375e5153b4a8f0422ee4c20e0de78a7518882886b929813fb475a0c90ec4238185236f5e39bef6abd5662e8f51a6950892d3e2a60')

build() {
  cd oscpy-$pkgver
  python setup.py build
}

check() {
  cd oscpy-$pkgver
  python -m pytest --reruns=5
}

package() {
  cd oscpy-$pkgver
  python setup.py install --root="$pkgdir" --optimize=1

  install -Dm644 LICENSE.txt -t "$pkgdir"/usr/share/licenses/$pkgname/
}
